#pragma once

#include "IEntity.h"
#include "SGD Wrappers/SGD_Math.h"

enum EntityType { EBASE, EITEM, ENOPICKUP, ETRAP, ESPIKE, EWEB, ELEVER, EDOOR, EKEYDOOR, EHIDDENDOOR, EUNIT, EPLAYER, EBASEENEMY, ESTATUE, ESPECTER, EPAINTING, EHEADBOSS, EHEAD, EPROJECTILE, ESLOW, ECHECKPOINT };

class CEntity : public IEntity
{
private:
	tVector2D tPosition;
	tVector2D tSize;
	int nImageID;
	int nRefCount;
	EntityType eEntityType;

public:

	tVector2D GetPosition() const { return tPosition; }
	float GetPositionX() const { return tPosition.fX; }
	float GetPositionY() const { return tPosition.fY; }
	tVector2D GetSize() const { return tSize; }
	float GetWidth() const { return tSize.fX; }
	float GetHeight() const { return tSize.fY; }
	int GetImageID() const { return nImageID; }
	int GetRefCount() const { return nRefCount; }
	int GetEntityType() const { return eEntityType; }
	
	void SetPosition(tVector2D val) { tPosition = val; }
	void SetPositionX(float fX) {tPosition.fX = fX; }
	void SetPositionY(float fY) {tPosition.fY = fY; }
	void SetSize(tVector2D val) { tSize = val; }
	void SetWidth(float fWidth) { tSize.fX = fWidth; }
	void SetHeight(float fHeight) { tSize.fY = fHeight; }
	void SetImageID(int val) { nImageID = val; }
	void SetRefCount(int val) { nRefCount = val; }
	void SetEntityType(int val) { eEntityType = (EntityType)val; }

	virtual void Update(float fElapsedTime) override;
	virtual void Render() override;

	virtual RECT GetRect() const override;
	virtual void HandleCollision(const IEntity* pOther) override;
	virtual void HandleMessage(const IMessage* pMessage) override;

	virtual void AddRef() override;
	virtual void Release() override;
};

